home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group92c.txt / 000082_icon-group-sender _Thu Nov 12 22:19:21 1992.msg < prev    next >
Internet Message Format  |  1993-01-04  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Fri, 13 Nov 1992 05:29:29 MST
  2. Date: Thu, 12 Nov 1992 22:19:21 MST
  3. From: "President Clinton Jeffery" <cjeffery>
  4. Message-Id: <199211130519.AA22161@chuckwalla.cs.arizona.edu>
  5. To: isidev!nowlin@uunet.uu.net
  6. Cc: icon-group
  7. In-Reply-To: isidev!nowlin@uunet.uu.net's message of Thu, 12 Nov 92 18:36:19 -0500 <9211122336.AA23580@relay2.UU.NET>
  8. Subject: Re rationale for sortf()
  9. Status: R
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12.  
  13.    Jerry Nowlin writes:
  14. >   You can define tables with field names as key and the record index as value
  15. >   and just use that in place of field name arguments to sortf().  When you
  16. >   change record definitions you would have to change tables values.  This
  17. >   won't help with Idol unfortunately.  Maybe Idol could put extra fields at
  18. >   the end of records to avoid obscuring known index values?
  19.  
  20. An interesting thought.  There is no reason the two "extra fields" could not
  21. be put at the back.  But current default behavior notwithstanding, objects
  22. are not supposed to be transparent and allow any old function to access
  23. their internal fields; a sortf() that would be technically correct for Idol
  24. would call a procedure (method, really) to access the key, and there are real
  25. technical reasons why sortf() doesn't call back out to an Icon procedure (or
  26. Idol method) in the present implementation -- none of Icon's built-in
  27. functions do that, in fact.  Writing a built-in Icon function that calls
  28. procedures is our user-grailquest for the week; in the meantime sorters of
  29. lists of objects would do well to consider adapting Bob Alexander's elegant
  30. isort procedure from the Icon program library.
  31.